﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
using System.Text;
using System.Net;
using System.Net.Cache;
using Yd.Util;
using System.Data;

namespace yedian
{
    public partial class SetAbout : AdminPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DataSet ds = commdal.GetWebSite();
                if (ds != null && ds.Tables[0].Rows.Count > 0)
                {
                    this.NewsContent.Value = ds.Tables[0].Rows[0]["aboutContent"].ToString().Trim();
                }
            }
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            if (commdal.SaveOrUpdateSql("update yd_webconfig set aboutContent='" + NewsContent.Value.Trim() + "' where wid=1") == 0)
            {
                errinfo.Text = "保存成功";
            }
            else
            {
                errinfo.Text = "更新失败";
            }

        }
    }
}